<template>
  <div class="vote-list">
    <div v-title>{{ title }}</div>
    <div class="banner-box">
      <img class="banner" src="./images/zhongda.png" alt="">
    </div>
  </div>
</template>

<script>
import { Toast, Loadmore } from 'mint-ui'
import { VoteActivities, VoteWechatLogin, VoteListDate, VoteCheckToken } from '@/service/getDate'
import { getUrlKey, Animate } from '@/config/utils'
import WeixinShareWay from '@/config/weixinShare'
export default {
  name: 'vote-list',
  components: {
    [Loadmore.name]: Loadmore
  },
  data () {
    return {
      title: '噢啦网',
      code: '',
      activities: '',
      votedToday: '', // 今天我已投票 1是 0否
      voteToken: '',
      showBackStatus: true, // 显示返回顶部按钮
      wrapperHeight: 0,
      showRule: false, // 活动规则模块的状态
      voteListDate: ''
    }
  },
  created () {
    // 下拉加载的拖动高度
    this.wrapperHeight = (document.documentElement.clientHeight)

    // 检测token，有去拿详情，无去拿token
    this.detectToken()
    this.voteListDate = VoteListDate()// 填充数据

    // 微信分享链接
    var shareLink = 'https://www.oolagongyi.com/activities/#/vote-list'
    WeixinShareWay(shareLink)
  },
  methods: {
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.vote-list {
  position: relative;
  height: 100%vh;
  background-color: #fff;

  .banner-box {
    overflow: hidden;
  }
  .banner {
    width: 100%;
    margin-bottom: 1.4rem;
  }
  .activity-rule {
    width: 80px;
    text-align: center;
    margin: -7.5rem auto 7.5rem;
    font-size: 13px;
    color: #7C7C7C;
    overflow: hidden;

    img {
      width: 13px;
      height: 13px;
      margin-left: 5px;
      margin-top: 2px;
    }
  }
  .activity-rule-box {
    position: relative;
    height: 100%;

    ul {
      padding-top: 8px;
      color: #7c7c7c;

      li {
        padding-bottom: 6px;
      }
    }
    .rule-text {
      font-size: 12px;
      padding: 19.5px 15px 16px;
    }
  }
  .close-rule {
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    padding: 12.2px;
  }
  .window-top {
    width: 100%;
  }
  .window-vote {
    display: block;
    width: 162px;
    margin: 0 auto;
  }
  .rule-con {
    position: fixed;
    top: 132px;
    left: 50%;
    width: 305px;
    margin-left: -152.5px;
    border-radius: 7px;
    z-index: 2;
    background-color: #fff;
  }
  .mask {
    top: 0;
    left: 0;
    position: fixed;
    width: 100%;
    height: 100%;
    opacity: 0.56;
    background: #000;
    z-index: 1;
  }
  .scrool-top {
    display: none;
    position: fixed;
    bottom: 200px;
    @media screen and (max-width: 374px) {
      bottom: 180px;
    }
    @media screen and (min-width: 376px) {
      bottom: 220px;
    }
    right: 15px;
    width: 43px;
    height: 43px;
  }
  .qr-code {
    width: 100%;
    margin-top: 29px;
    margin-bottom: 42.5px;
  }
  .vote {
    float: right;
    display: block;
    width: 5.8rem;
    height: 30px;
    line-height: 31px;
    text-align: center;
    border-radius: 30px;
    background-color: #FFB717;
    color: #fff;
    font-size: 14px;
    margin-top: 26px;
  }
  .vote-submit-complete {
    color: #fff;
    background-color: #B4BDC6;
  }
  .vote-li {
    margin: 0 15px;
    border-top: 1px solid #DCE0E4;

    .vote-con {
      float: left;
      overflow: hidden;

      width: 37%;
      @media screen and (min-width: 375px) {
        width: 44%;
      }

      .sub-title {
        margin-bottom: 4px;
      }
      h2, p {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
      }
      p {
        font-size: 12px;
      }
      h2 {
        font-size: 14px;
        margin-top: 9px;
        margin-bottom: 4px;
      }
    }
    .main-img {
      float: left;
      display: block;
      width: 5.3rem;
      margin-left: 7px;
      margin-right: 11px;
    }
    .rank {
      float: left;
      width: 2.5rem;
      margin-top: 25.5px;
    }
    .flapper {
      float: left;
      display: block;
      width: 31px;
      height: 31px;
      line-height: 31px;
      margin-top: 25.5px;
      background-color: #FFB717;
      font-size: 14px;
      color: #fff;
      text-align: center;
      border-radius: 50%;
    }
    li {
      padding: 9px 0;
      border-bottom: 1px solid #DCE0E4;
      overflow: hidden;
    }
  }

  .page-loadmore-wrapper {
    -webkit-overflow-scrolling: touch; // IOS设备滑动流畅 允许独立的滚动区域和触摸回弹
    overflow-y: scroll;
  }
}
</style>
